<?php

	class Devmod_method_castField_sql_object extends Devmod_castField_abstraction {
		
		public function type_frontend_list()
		{
			$where = false;
			
			if(isset($this->cfg['args']['where']))
			{
				$where = str_replace("%%value%%", $this->value, $this->cfg['args']['where']);
			}
			$obj = $this->db->select($this->cfg['args']['table'], "*", $where, false);
			
			return $this->helper->object_to_array($obj);
		}
		
	}